﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using GestionCases;
using GestionEco;

namespace Ecosystème
{
    public static class Jeu
    {

        public static List<EtreVivant> Ev;
        public static int nbTours;
        public static int tourCourant;
        public static event Ecosystème.frmPlateau.ArgDelegate evArg;



        public static void simulation()
        {

            tourCourant = 0;
            Ev = new List<EtreVivant>();
            initJeu();
            nbTours = 100;
        }

        public static void initJeu()
        {
            int i = 0;


            while (i < 10)
            {
                Ev.Add(new Loup(1, 2, 3, 4, 5, 6, 7, 8, 9, Color.Black));
                envoyerLesInfos("création d'un Loup");
                i++;
            }

            i = 0;
            while (i < 10)
            {
                Ev.Add(new Chevre(1, 1, 1, 1, 1, 1, 1, 1, 1, Color.Red));
                envoyerLesInfos("création d'une chevre");
                i++;
            }

            i = 0;
            while (i < 10)
            {
                Ev.Add(new Tulipe(Color.Green));
                envoyerLesInfos("création d'une Tulipe");
                i++;

            }


        }

        public static void envoyerLesInfos(String data)
        {
            DelArgPlateauSim arg = new DelArgPlateauSim();
            arg.infos = data;
            arg.EvInfos = Ev;
            evArg(arg);
        }


    }
}
